import { ref } from 'vue'
import { defineStore } from 'pinia'

export const useCounterStore = defineStore('counter', () => {
  const count = ref(200)

  const increment = (num: number) => {
    count.value += num
  }

  const decrement = (num: number) => {
    count.value -= num
  }

  return { count, decrement, increment }
})
